package com.yjkf.zh.test.controller;

import com.yjkf.zh.test.mapper.UserMapper;
import com.yjkf.zh.test.model.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/user/{id}")
    public SysUser getUser(@PathVariable("id") long id){
        return userMapper.getUserId(id);
    }
}
